body {
    margin: 20px;
}

.layui-card {
    width: 700px;
    margin-bottom: 20px;
}

.layui-card-header {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.chat-area {
    height: 350px;
    overflow-y: scroll;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f2f2f2;
}

.message {
    margin-bottom: 10px;
    display: flex;
}

.self {
    justify-content: flex-end;
}
#chatArea{
   
    max-width: 100%;

}
.message-bubble {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    max-width: 100%;
    word-break: break-all;
}

.self .message-bubble {
    background-color: #5FB878;
    color: white;
}

.other .message-bubble {
    background-color: #1E9FFF;
    color: white;
}

.message .username {
    font-weight: bold;
    margin-right: 5px;
}

.message .timestamp {
    font-size: 12px;
    color: #999;
}

.message-input {
    width: calc(100% - 80px);
}

.send-btn {
    width: 70px;
}